Operating systems typically include functionality to manage and use system memory. This functionality is typically, provided by a kernel. The kernel provides one or more of the following functions to allow user-level and kernel-level applications to use and manage system memory: functions to allocate memory, functions to map memory, functions to profile application memory usage, etc. In addition, operating systems typically employ memory management schemes that use software to extend the capabilities of the physical hardware. Specifically, software is used to provide a bridge between real memory (i.e., the physical memory) and virtual memory (i.e., memory that user-level and kernel-level applications manipulate). Software is typically necessary to bridge the gap between real memory and virtual memory because typically the address space used by user-level and kernel-level applications does not correspond one-to-one with real memory.
Conventionally, in order to translate a virtual memory address into a physical address, the operating system uses a mapping between the physical and virtual address. The mapping is generally stored in a translation look-aside buffer (TLB) associated with a processor upon which the operating system is executing. The mappings between the physical memory and the virtual memory are stored as a series of entries, where each entry in the TLB represents a single page of virtual memory mapped to physical memory. The page corresponds to a unit of virtual memory. As the amount of physical memory and, as a consequence, virtual memory increases, the page size becomes an important factor with respect to system performance. Specifically, because the total amount of virtual memory that can be mapped/entered into the TLB is dependent on the page size, if the page size increases, then the TLB coverage (i.e., memory mapped within a given TLB) can grow proportionally. This increase in page size typically results in a performance increase for user-level and kernel-level applications that have intensive memory requirements.
When the page size used by a particular operating system has remained constant for an extended period of time, user-level and kernel-level applications may accumulate dependencies (both implicit and explicit) on the page size. Such dependencies are typically difficult to detect using static analysis (i.e., looking for use of problematic interfaces). Further, the dependency per application is often subtle and difficult to find. If developers change the default page size for the entire system by modifying the kernel, the applications that have dependencies on page size often cease to function correctly. Accordingly, various techniques have been developed to determine the existence of a page size dependency.
One such technique is to provide a “knob” or tunable device that changes the system page size in the kernel, allowing a developer to test for problematic applications while still preserving the default behavior. This technique is typically implemented by modifying the kernel to support alternate page sizes. Once the page size has been modified, the user may then proceed to test all user-level and kernel-level applications individually and, thereby, determine the particular user-level and kernel level applications having page size dependencies. Once these applications have been identified, the applications may be modified to remove the page size dependencies.